package com.ss.android.article.base.app;

import android.content.Context;
import android.content.res.TypedArray;
import com.handmark.pulltorefresh.library.PullToRefreshBase.AnimationStyle;
import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation;
import com.handmark.pulltorefresh.library.PullToRefreshBase.IAnimationStyle;
import com.handmark.pulltorefresh.library.internal.LoadingLayout;
import com.ss.android.article.base.ui.ai;
import com.ss.android.article.base.ui.SSLoadingLayout;

final class i implements IAnimationStyle {
    i() {

    }

    public final LoadingLayout createLoadingLayout(Context context, Mode mode, Orientation orientation, TypedArray attrs) {
        LoadingLayout v0_3;
        LoadingLayout v0_2;
        int v0 = 2;
        if(attrs != null) {
            v0 = attrs.getInteger(com.ss.android.article.base.a.U, v0);
        }

        switch(v0) {
            case 0: {
                v0_3 = AnimationStyle.ROTATE.createLoadingLayout(context, mode, orientation, attrs);
                break;
            }
            case 1: {
                v0_3 = AnimationStyle.FLIP.createLoadingLayout(context, mode, orientation, attrs);
                break;
            }
            case 3: {
                v0_3 = new ai(context, mode, orientation, attrs);
                break;
            }
            default: {
                v0_3 = new SSLoadingLayout(context, mode, orientation, attrs);
                break;
            }
        }

        return v0_3;
    }
}

